<template>
	<div>
		<h3 v-if="!$store.state.isLogin">请登录</h3>
		<h3 v-else>Hi~{{$store.state.user.nickName}}</h3>
		<keep-alive>
			<router-view/>
		</keep-alive>
	</div>
</template>

<script>
	export default {
		methods:{
			checkLogin(){
				if(!this.$store.state.isLogin){
					this.$router.replace('/Admin/Login')
				}else{
					this.$router.replace('./Admin/Show')
				}
			}
		},
		mounted(){
			// this.checkLogin()
		}
	}
</script>

<style>
	h3{
		text-align: center;
		user-select: none;
	}
</style>
